import {request} from '@/utils/request';

export function findDeviceStatisticsApi(params?: any) {
  return request(
    {
      url: '/lms/device/statistics/findDeviceStatistics',
      method: 'post',
      data: params,
    },
    {
      isMock: false,
    },
  );
}

export function listDeviceEarlyPageApi(params?: any) {
  return request(
    {
      url: '/lms/device/early/listDeviceEarlyPage',
      method: 'post',
      data: params,
    },
    {
      isMock: false,
      isDataDirectly: false,
    },
  );
}

/**
 * @description 设备异常处理
 */
export function earlyHandleApi(data?: any) {
  return request(
    {
      url: '/lms/device/early/earlyHandle',
      method: 'post',
      data,
    },
    {
      isDataDirectly: false,
    },
  );
}

/**
 * 电子围拦设置
 * @description 设备异常处理
 */
export function electronicFenceApi(data?: any) {
  return request(
    {
      url: '/lms/bracelet/electronicFence',
      method: 'post',
      data,
    },
    {
      isDataDirectly: false,
    },
  );
}

/**
 * 获取手环信息
 * @description 设备异常处理
 */
export function findBraceletApi(data?: any) {
  return request(
    {
      url: '/lms/device/data/findBracelet',
      method: 'post',
      data,
    },
    {
      isDataDirectly: true,
    },
  );
}

/**
 * 查询设备交互日志
 * @param data 查询参数
 */
export function listDeviceLogPageApi(data?: any) {
  return request(
    {
      url: '/lms/device/log/listDeviceLogPage',
      method: 'post',
      data,
    },
    {
      isDataDirectly: false,
    },
  );
}
